<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />

<div class="t_bar">
	<span class="color_red">*</span>国家资助经费下达情况
</div>
<table id="tblfunds" cellpadding="0" class="t_css table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%">选择</th>
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="20%">经费下达时间</th>
			<th class="TblHead" align="center" width="25%">经费下达通知书/文件编号</th>
			<th class="TblHead" align="center" width="25%">经费进账凭证号</th>
			<th class="TblHead" align="center" width="20%">下达经费金额（万元）</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton" name="selfunds">
			</td>
			<td align="center"><span name="funds|fund[0]@seq_no">[index]</span>
			</td>
			<td align="center" nowrap><input  id="fund_transmit_date_[0]" name="funds|fund[0]|transmit_date" label="经费下达时间" value="" class=" required input_text date " style="width:65px" /></td>
			<td style="text-align: center;"><input type="text"
				name="funds|fund[0]|fund_file" style="width:80%" class="input_text required"
				maxlength=50 label="经费下达通知书/文件编号" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="funds|fund[0]|fund_income_no" style="width:80%" class="input_text required"
				maxlength=50 label="经费进账凭证号" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="funds|fund[0]|fund_num" style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				maxlength=100 label="下达经费金额" value="" />
			</td>
		</tr>


		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/funds/fund" var="fund">
			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center"><input type="radio" class="radiobutton"
					name="selfunds">
				</td>
				<td align="center"><span
					name="funds/fund[${flag}${index}]@seq_no">${index+1}</span></td>
				<td align="center" nowrap>
				<c:set var="transmit_date" scope="page"><x:out select="$fund/transmit_date"/></c:set>
				<input  id="fund_transmit_date_[${flag}${index}]" value="${transmit_date}" name="funds/fund[${flag}${index}]/transmit_date" class="required date input_text" style="width:65px" label="经费下达时间" /> 
				<td style="text-align: center;"><input type="text"  style="width:80%"
					name="funds/fund[${flag}${index}]/fund_file"
					class="input_text required" maxlength=50 label="经费下达通知书/文件编号"
					value="<x:out select="$fund/fund_file" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="funds/fund[${flag}${index}]/fund_income_no"
					class="input_text required" maxlength=50 label="经费进账凭证号"
					value="<x:out select="$fund/fund_income_no" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="funds/fund[${flag}${index}]/fund_num"
					class="input_text required" label="下达经费金额" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$fund/fund_num" />" />
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
						showAllDateTag("tblfunds");
		</script>
	</tbody>
</table>
<table width="98%" align="center" border="0">
					<tr style="border: 0"><td style="border: 0"><input class="button" name="cmdAddbefore" type=button
			value="添加" onclick="addNewRow('tblfunds');showDateTag('tblfunds');try{topObjectFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev"
			type=button value="上移" onclick="movePrev('tblfunds','selfunds')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblfunds','selfunds')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblfunds','国家省资助经费下达情况')"></td>
	</tr>
</table>
<table  id="feaReport_upload" cellpadding="0" class="t_css table01" width="100%" border="0" cellpadding="0">
	<tr>
	    <td class="t_bar2" width="29%"><span class="color_red">*</span>服务外包企业新录用人员培训情况汇总表<br /></td>
		<td  class="t_bar2" width="71%">
			<input type="file" name="filedata" />
			<input type="hidden" id="uploadTypeKeyContent" value="proposal_content," /> 
			<input type="hidden" id="file_code" name="proposal/file_code" class="required" value="<x:out select="$xmlData/data/proposal/file_code" />" />
		</td>
	</tr>
	<c:set var="file_code"><x:out select="$xmlData/data/proposal/file_code" /></c:set>
		<tr id="uploadsuccess" <c:if test="${file_code==''}" >style="display:none" </c:if> >
			<td colspan="2">
				<input type="hidden" id="fileNameHid" value="<x:out select="$xmlData/data/proposal/file_name" />"/>
				您已经上传附件：<a id="proposal_downLoadFile" href="${ctx}/file/ajax-filedownload?fileCode=<x:out select="$xmlData/data/proposal/file_code" />" class="link_x" ><span name="proposal/file_name" id="file_name"><x:out select="$xmlData/data/proposal/file_name" /></span></a>&nbsp;&nbsp;(上传时间<span name="proposal/file_date" id="file_date"><x:out select="$xmlData/data/proposal/file_date" /></span>) <a href="###" class="link_x" onclick="delContent('feaReport_upload')">删除</a>
			</td>
		</tr>
</table>
<table id="tblTrains" cellpadding="0" class="t_css table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="4%" rowspan="2">选择</th>
			<th class="TblHead" align="center" width="4%" rowspan="2">序号</th>
			<th class="TblHead" align="center" width="8%" rowspan="2">单位名称</th>
			<th class="TblHead" align="center" width="8%" rowspan="2">录用人员姓名</th>
			<th class="TblHead" align="center" width="9%" rowspan="2">身份证号</th>
			<th class="TblHead" align="center" width="7%" rowspan="2">性别</th>
			<th class="TblHead" align="center" width="7%" rowspan="2">学历</th>
			<th class="TblHead" align="center" width="7%" rowspan="2">合同时间</th>
			<th class="TblHead" align="center" width="6%" rowspan="2">是否本地参保</th>
			<th class="TblHead" align="center" width="8%" rowspan="2">最近一次社保缴费日期</th>
			<th class="TblHead" align="center" width="8%" rowspan="2">培训机构</th>
			<th class="TblHead" align="center" width="8%" rowspan="2">培训项目</th>
			<th class="TblHead" align="center" width="16%" colspan="2">培训支出（万元）</th>
		</tr>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="8%" >总额</th>
			<th class="TblHead" align="center" width="8%" >其中国家扶持金额</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton" name="selTrains">
			</td>
			<td align="center"><span name="trains|train[0]@seq_no">[index]</span>
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_org_name" style="width:80%" class="input_text required"
				maxlength=50 label="单位名称" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_psn_name" style="width:80%" class="input_text required"
				maxlength=50 label="录用人员姓名" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|card_code" style="width:80%" class="input_text required idCard"
				maxlength=20 label="身份证号" value="" />
			</td>
			<td style="text-align: center;">
				<cpt:select id="train_gender[index]" key="gender"  name="train_gender" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="trains|train[0]|train_gender_value" class="required" label="性别" value=""/>
		         <input type="hidden" name="trains|train[0]|train_gender_name" value=""/>
			</td>
			<td style="text-align: center;">
				<cpt:select id="train_educate[index]" key="educate"  name="train_educate" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="trains|train[0]|train_educate_value" class="required" label="学历" value=""/>
		         <input type="hidden" name="trains|train[0]|train_educate_name" value=""/>
			</td>
			<td align="center" nowrap>
			<input  id="train_start_date_[0]" name="trains|train[0]|start_date" label="合同开始时间" value="" class=" required input_text date dateCompare:train_end_date_[0]" style="width:65px" /><br/>至<br/>
			<input  id="train_end_date_[0]" name="trains|train[0]|end_date" label="合同结束时间" value="" class=" required input_text date " style="width:65px" />
			</td>
			<td style="text-align: center;">
				<cpt:select id="train_boolean[index]" key="boolean"  name="train_boolean" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="trains|train[0]|train_boolean_value" class="required" label="是否本地参保" value=""/>
		         <input type="hidden" name="trains|train[0]|train_boolean_name" value=""/>
			</td>
			<td align="center" nowrap><input  id="train_security_date_[0]" name="trains|train[0]|security_date" label="最近一次社保缴费日期" value="" class=" required input_text date " style="width:65px" /></td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_institution" style="width:80%" class="input_text required"
				maxlength=30 label="培训机构" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_project" style="width:80%" class="input_text required"
				maxlength=50 label="培训项目" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_pay_total" style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				label="培训支出总额" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="trains|train[0]|train_pay_country"style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				label="培训支出国家扶持金额 " value="" />
			</td>
			
		</tr>


		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/trains/train" var="train">

			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center"><input type="radio" class="radiobutton"
					name="selTrains">
				</td>
				<td align="center"><span
					name="trains/train[${flag}${index}]@seq_no">${index+1}</span></td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="trains/train[${flag}${index}]/train_org_name"
					class="input_text required" maxlength=50 label="单位名称"
					value="<x:out select="$train/train_org_name" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="trains/train[${flag}${index}]/train_psn_name"
					class="input_text required" maxlength=50 label="录用人员姓名"
					value="<x:out select="$train/train_psn_name" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="trains/train[${flag}${index}]/card_code"
					class="input_text required idCard" maxlength=50 label="身份证号"
					value="<x:out select="$train/card_code" />" />
				</td>
			   <td style="text-align: center;">
			       <c:set var="train_gender_value"><x:out select="$train/train_gender_value" /></c:set>
				   <cpt:select id="train_gender${index}" key="gender" name="train_gender" onChange="initControlValue(this.id);" value="${train_gender_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_gender_value" class="required" label="性别" value="<x:out select="$train/train_gender_value" />"/>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_gender_name" value="<x:out select="$train/train_gender_name" />"/>
				</td>
				<td style="text-align: center;">
			       <c:set var="train_educate_value"><x:out select="$train/train_educate_value" /></c:set>
				   <cpt:select id="train_educate${index}" key="educate" name="train_educate" onChange="initControlValue(this.id);" value="${train_educate_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_educate_value" class="required" label="学历" value="<x:out select="$train/train_educate_value" />"/>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_educate_name" value="<x:out select="$train/train_educate_name" />"/>
				</td>
				<td align="center" nowrap>
				<c:set var="start_date" scope="page"><x:out select="$train/start_date"/></c:set>
				<input  id="train_start_date_[${flag}${index}]" value="${start_date}" name="trains/train[${flag}${index}]/start_date" class="required date input_text dateCompare:train_end_date_[${flag}${index}]" style="width:65px" label="合同开始时间" /><br/>至<br/>
				<c:set var="end_date" scope="page"><x:out select="$train/end_date"/></c:set>
				<input  id="train_end_date_[${flag}${index}]" value="${end_date}" name="trains/train[${flag}${index}]/end_date" class="required date input_text" style="width:65px" label="合同结束时间" /> </td>
				<td style="text-align: center;">
			       <c:set var="train_boolean_value"><x:out select="$train/train_boolean_value" /></c:set>
				   <cpt:select id="train_boolean${index}" key="boolean" name="train_boolean" onChange="initControlValue(this.id);" value="${train_boolean_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_boolean_value" class="required" label="是否本地参保" value="<x:out select="$train/train_boolean_value" />"/>
			       <input type="hidden" name="trains/train[${flag}${index}]/train_boolean_name" value="<x:out select="$train/train_boolean_name" />"/>
				</td>
				<td align="center" nowrap>
				<c:set var="security_date" scope="page"><x:out select="$train/security_date"/></c:set>
				<input  id="train_security_date_[${flag}${index}]" value="${security_date}" name="trains/train[${flag}${index}]/security_date" class="required date input_text" style="width:65px" label="最近一次社保缴费日期" /> 
				</td>
				<td style="text-align: center;"><input type="text"  style="width:80%"
					name="trains/train[${flag}${index}]/train_institution"
					class="input_text required" maxlength=30 label="培训机构"
					value="<x:out select="$train/train_institution" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="trains/train[${flag}${index}]/train_project"
					class="input_text required" maxlength=50 label="培训项目"
					value="<x:out select="$train/train_project" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="trains/train[${flag}${index}]/train_pay_total"
					class="input_text required" label="培训支出总额" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$train/train_pay_total" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="trains/train[${flag}${index}]/train_pay_country"
					class="input_text required" label="培训支出国家扶持金额" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$train/train_pay_country" />" />
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
						showAllDateTag("tblTrains");
		</script>
	</tbody>
</table>
<p style="color: red;" id="remark">最多可添加30条记录，若超过30条，请以附件(支持word,pdf,xls格式)形式上传，并自行打印，与申请书PDF打印材料一起提交至管理部门</p>
<table width="98%" align="center" border="0" id="tblTrains2">
					<tr style="border: 0"><td style="border: 0"><input class="button" name="cmdAddbefore" type=button
			value="添加" onclick="if(checkTabLimit('tblTrains',31,'服务外包企业新录用人员培训情况汇总表最多只能填写30条')){addNewRow('tblTrains');showDateTag('tblTrains');}try{topObjectFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev"
			type=button value="上移" onclick="movePrev('tblTrains','selTrains')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblTrains','selTrains')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblTrains','服务外包企业新录用人员培训情况汇总表')"></td>
	</tr>
</table>


<div class="t_bar" id="tblConditions1">
	<span class="color_red">*</span>培训机构人才培训项目情况表

</div>
<table id="tblConditions" cellpadding="0" class="t_css table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%" >选择</th>
			<th class="TblHead" align="center" width="5%" >序号</th>
			<th class="TblHead" align="center" width="9%" nowrap>培训项目名称</th>
			<th class="TblHead" align="center" width="9%" >培训内容</th>
			<th class="TblHead" align="center" width="9%" >培训时间</th>
			<th class="TblHead" align="center" width="9%" >培训人数</th>
			<th class="TblHead" align="center" width="9%" >考核通过人数</th>
			<th class="TblHead" align="center" width="9%" >其中与服务外包企业签订1年以上劳动合同人数</th>
			<th class="TblHead" align="center" width="9%" >其中无锡本地就业人数</th>
			<th class="TblHead" align="center" width="9%" >培训收入（万元）</th>
			<th class="TblHead" align="center" width="9%" >培训支出（万元）</th>
			<th class="TblHead" align="center" width="9%" >是否盈利</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton" name="selConditions">
			</td>
			<td align="center"><span name="conditions|condition[0]@seq_no">[index]</span>
			</td>
			<td style="text-align: center;"><input type="text"
				name="conditions|condition[0]|train_name" style="width:80%" class="input_text required"
				maxlength=50 label="培训项目名称" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="conditions|condition[0]|train_content" style="width:80%" class="input_text required"
				maxlength=50 label="培训内容" value="" />
			</td>
			<td align="center" nowrap>
			<input  id="condition_start_date_[0]" name="conditions|condition[0]|start_date" label="培训开始时间" value="" class=" required input_text date dateCompare:condition_end_date_[0]" style="width:65px" /><br/>至<br/>
			<input  id="condition_end_date_[0]" name="conditions|condition[0]|end_date" label="培训结束时间" value="" class=" required input_text date " style="width:65px" />
			</td>
			<td style="text-align: center;">
			<input type="text" name="conditions|condition[0]|train_people" style="width:80%;text-align: right;" class="input_text required" label="培训人数" value="" onfocus="InitInput.setNumber(this,9,0,0)" />
			</td>
			<td style="text-align: center;">
			<input type="text" name="conditions|condition[0]|pass_people" style="width:80%;text-align: right;" class="input_text required" label="考核通过人数" value="" onfocus="InitInput.setNumber(this,9,0,0)" />
			</td>
			<td style="text-align: center;">
			<input type="text" name="conditions|condition[0]|sign_people" style="width:80%;text-align: right;" class="input_text required" label="其中与服务外包企业签订1年以上劳动合同人数" value="" onfocus="InitInput.setNumber(this,9,0,0)" />
			</td>
			<td style="text-align: center;">
			<input type="text" name="conditions|condition[0]|hire_people" style="width:80%;text-align: right;" class="input_text required" label="其中与服务外包企业签订1年以上劳动合同人数" value="" onfocus="InitInput.setNumber(this,9,0,0)" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="conditions|condition[0]|train_income" style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				label="培训收入" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="conditions|condition[0]|train_pay" style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				label="培训支出 " value="" />
			</td>
			<td style="text-align: center;">
				<cpt:select id="condition_boolean[index]" key="boolean"  name="condition_boolean" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="conditions|condition[0]|condition_boolean_value" class="required" label="是否盈利" value=""/>
		         <input type="hidden" name="conditions|condition[0]|condition_boolean_name" value=""/>
			</td>
		</tr>


		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/conditions/condition" var="condition">

			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center"><input type="radio" class="radiobutton"
					name="selConditions">
				</td>
				<td align="center"><span
					name="conditions/condition[${flag}${index}]@seq_no">${index+1}</span></td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="conditions/condition[${flag}${index}]/train_name"
					class="input_text required" maxlength=50 label="培训项目名称"
					value="<x:out select="$condition/train_name" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="conditions/condition[${flag}${index}]/train_content"
					class="input_text required" maxlength=50 label="培训内容"
					value="<x:out select="$condition/train_content" />" />
				</td>
				<td align="center" nowrap>
				<c:set var="start_date" scope="page"><x:out select="$condition/start_date"/></c:set>
				<input  id="condition_start_date_[${flag}${index}]" value="${start_date}" name="conditions/condition[${flag}${index}]/start_date" class="required date input_text dateCompare:condition_end_date_[${flag}${index}]" style="width:65px" label="培训开始时间" /><br/>至<br/>
				<c:set var="end_date" scope="page"><x:out select="$condition/end_date"/></c:set>
				<input  id="condition_end_date_[${flag}${index}]" value="${end_date}" name="conditions/condition[${flag}${index}]/end_date" class="required date input_text" style="width:65px" label="培训结束时间" /> </td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/train_people"
					class="input_text required" label="培训人数" onfocus="InitInput.setNumber(this,9,0,0)" 
					value="<x:out select="$condition/train_people" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/pass_people"
					class="input_text required" label="考核通过人数" onfocus="InitInput.setNumber(this,9,0,0)" 
					value="<x:out select="$condition/pass_people" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/sign_people"
					class="input_text required" label="其中与服务外包企业签订1年以上劳动合同人数" onfocus="InitInput.setNumber(this,9,0,0)" 
					value="<x:out select="$condition/sign_people" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/hire_people"
					class="input_text required" label="其中无锡本地就业人数" onfocus="InitInput.setNumber(this,9,0,0)" 
					value="<x:out select="$condition/hire_people" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/train_income"
					class="input_text required" label="培训收入" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$condition/train_income" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="conditions/condition[${flag}${index}]/train_pay"
					class="input_text required" label="培训支出" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$condition/train_pay" />" />
				</td>
				<td style="text-align: center;">
			       <c:set var="condition_boolean_value"><x:out select="$condition/condition_boolean_value" /></c:set>
				   <cpt:select id="condition_boolean${index}" key="boolean" name="condition_boolean" onChange="initControlValue(this.id);" value="${condition_boolean_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="conditions/condition[${flag}${index}]/condition_boolean_value" class="required" label="是否盈利" value="<x:out select="$condition/condition_boolean_value" />"/>
			       <input type="hidden" name="conditions/condition[${flag}${index}]/condition_boolean_name" value="<x:out select="$condition/condition_boolean_name" />"/>
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
						showAllDateTag("tblConditions");
		</script>
	</tbody>
</table>
<table width="98%" align="center" border="0" id="tblConditions2">
					<tr style="border: 0"><td style="border: 0"><input class="button" name="cmdAddbefore" type=button
			value="添加" onclick="addNewRow('tblConditions');showDateTag('tblConditions');try{topObjectFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev"
			type=button value="上移" onclick="movePrev('tblConditions','selConditions')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblConditions','selConditions')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblConditions','培训机构人才培训项目情况表')"></td>
	</tr>
</table>


<div class="t_bar" id="tblCollects1">
	<span class="color_red">*</span>培训机构人才培训情况汇总表

</div>
<table id="tblCollects" cellpadding="0" class="t_css table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%" >选择</th>
			<th class="TblHead" align="center" width="5%" >序号</th>
			<th class="TblHead" align="center" width="9%" nowrap>培训项目名称</th>
			<th class="TblHead" align="center" width="9%" >录用人员姓名</th>
			<th class="TblHead" align="center" width="9%" >身份证号</th>
			<th class="TblHead" align="center" width="9%" >性别</th>
			<th class="TblHead" align="center" width="9%" >学历</th>
			<th class="TblHead" align="center" width="9%" >录用企业名称</th>
			<th class="TblHead" align="center" width="9%" >企业所在地</th>
			<th class="TblHead" align="center" width="9%" >录用企业性质</th>
			<th class="TblHead" align="center" width="9%" >合同时间</th>
			<th class="TblHead" align="center" width="9%" >培训收费（万元）</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton" name="selCollects">
			</td>
			<td align="center"><span name="collects|collect[0]@seq_no">[index]</span>
			</td>
			<td style="text-align: center;"><input type="text"
				name="collects|collect[0]|train_name" style="width:80%" class="input_text required"
				maxlength=50 label="培训项目名称" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="collects|collect[0]|psn_name" style="width:80%" class="input_text required"
				maxlength=50 label="录用人员姓名" value="" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="collects|collect[0]|card_code" style="width:80%" class="input_text required idCard"
				maxlength=50 label="身份证号" value="" />
			</td>
			<td style="text-align: center;">
				<cpt:select id="collect_gender[index]" key="gender"  name="collect_gender" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="collects|collect[0]|collect_gender_value" class="required" label="性别" value=""/>
		         <input type="hidden" name="collects|collect[0]|collect_gender_name" value=""/>
			</td>
			<td style="text-align: center;">
				<cpt:select id="collect_educate[index]" key="educate"  name="collect_educate" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="collects|collect[0]|collect_educate_value" class="required" label="学历" value=""/>
		         <input type="hidden" name="collects|collect[0]|collect_educate_name" value=""/>
			</td>
			<td style="text-align: center;"><input type="text"
				name="collects|collect[0]|company_name" style="width:80%" class="input_text required"
				maxlength=50 label="录用企业名称" value="" />
			</td>
			<td style="text-align: center;">
				<cpt:select id="collect_address[index]" key="company_address"  name="collect_address" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="collects|collect[0]|collect_address_value" class="required" label="企业所在地" value=""/>
		         <input type="hidden" name="collects|collect[0]|collect_address_name" value=""/>
			</td>
			<td style="text-align: center;">
				<cpt:select id="collect_nature[index]" key="company_nature"  name="collect_nature" onChange="initControlValue(this.id);" style="width:80%"></cpt:select>
		         <input type="hidden" name="collects|collect[0]|collect_nature_value" class="required" label="录用企业性质" value=""/>
		         <input type="hidden" name="collects|collect[0]|collect_nature_name" value=""/>
			</td>
			<td align="center" nowrap>
			<input  id="collect_start_date_[0]" name="collects|collect[0]|start_date" label="合同开始时间" value="" class=" required input_text date dateCompare:collect_end_date_[0]" style="width:65px" /><br/>至<br/>
			<input  id="collect_end_date_[0]" name="collects|collect[0]|end_date" label="合同结束时间" value="" class=" required input_text date " style="width:65px" />
			</td>
			<td style="text-align: center;"><input type="text"
				name="collects|collect[0]|train_income" style="width:80%;text-align: right;" class="input_text required" onfocus="InitInput.setNumber(this,9,4,2)" 
				label="培训收费" value="" />
			</td>
		</tr>


		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/collects/collect" var="collect">

			<c:choose>
				<c:when test="${index<10}">
					<c:set value="0" var="flag" scope="page" />
				</c:when>
				<c:otherwise>
					<c:set value="" var="flag" scope="page" />
				</c:otherwise>
			</c:choose>
			<tr>
				<td align="center"><input type="radio" class="radiobutton"
					name="selCollects">
				</td>
				<td align="center"><span
					name="collects/collect[${flag}${index}]@seq_no">${index+1}</span></td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="collects/collect[${flag}${index}]/train_name"
					class="input_text required" maxlength=50 label="培训项目名称"
					value="<x:out select="$collect/train_name" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="collects/collect[${flag}${index}]/psn_name"
					class="input_text required" maxlength=50 label="录用人员姓名"
					value="<x:out select="$collect/psn_name" />" />
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="collects/collect[${flag}${index}]/card_code"
					class="input_text required idCard" maxlength=50 label="身份证号"
					value="<x:out select="$collect/card_code" />" />
				</td>
				<td style="text-align: center;">
			       <c:set var="collect_gender_value"><x:out select="$collect/collect_gender_value" /></c:set>
				   <cpt:select id="collect_gender${index}" key="gender" name="collect_gender" onChange="initControlValue(this.id);" value="${collect_gender_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_gender_value" class="required" label="性别" value="<x:out select="$collect/collect_gender_value" />"/>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_gender_name" value="<x:out select="$collect/collect_gender_name" />"/>
				</td>
				<td style="text-align: center;">
			       <c:set var="collect_educate_value"><x:out select="$collect/collect_educate_value" /></c:set>
				   <cpt:select id="collect_educate${index}" key="educate" name="collect_educate" onChange="initControlValue(this.id);" value="${collect_educate_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_educate_value" class="required" label="学历" value="<x:out select="$collect/collect_educate_value" />"/>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_educate_name" value="<x:out select="$collect/collect_educate_name" />"/>
				</td>
				<td style="text-align: center;"><input type="text" style="width:80%"
					name="collects/collect[${flag}${index}]/company_name"
					class="input_text required" maxlength=50 label="录用企业名称"
					value="<x:out select="$collect/company_name" />" />
				</td>
				<td style="text-align: center;">
			       <c:set var="collect_address_value"><x:out select="$collect/collect_address_value" /></c:set>
				   <cpt:select id="collect_address${index}" key="company_address" name="collect_address" onChange="initControlValue(this.id);" value="${collect_address_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_address_value" class="required" label="企业所在地" value="<x:out select="$collect/collect_address_value" />"/>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_address_name" value="<x:out select="$collect/collect_address_name" />"/>
				</td>
				<td style="text-align: center;">
			       <c:set var="collect_nature_value"><x:out select="$collect/collect_nature_value" /></c:set>
				   <cpt:select id="collect_nature${index}" key="company_nature" name="collect_nature" onChange="initControlValue(this.id);" value="${collect_nature_value }" style="width:80%"></cpt:select>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_nature_value" class="required" label="录用企业性质" value="<x:out select="$collect/collect_nature_value" />"/>
			       <input type="hidden" name="collects/collect[${flag}${index}]/collect_nature_name" value="<x:out select="$collect/collect_nature_name" />"/>
				</td>
				<td align="center" nowrap>
				<c:set var="start_date" scope="page"><x:out select="$collect/start_date"/></c:set>
				<input  id="collect_start_date_[${flag}${index}]" value="${start_date}" name="collects/collect[${flag}${index}]/start_date" class="required date input_text dateCompare:collect_end_date_[${flag}${index}]" style="width:65px" label="合同开始时间" /><br/>至<br/>
				<c:set var="end_date" scope="page"><x:out select="$collect/end_date"/></c:set>
				<input  id="collect_end_date_[${flag}${index}]" value="${end_date}" name="collects/collect[${flag}${index}]/end_date" class="required date input_text" style="width:65px" label="合同结束时间" /> </td>
				<td style="text-align: center;"><input type="text" style="width:80%;text-align: right;"
					name="collects/collect[${flag}${index}]/train_income"
					class="input_text required" label="培训收费" onfocus="InitInput.setNumber(this,9,4,2)" 
					value="<x:out select="$collect/train_income" />" />
				</td>
			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
		<script type="text/javascript">
						showAllDateTag("tblCollects");
		</script>
	</tbody>
</table>
<table width="98%" align="center" border="0" id="tblCollects2">
					<tr style="border: 0"><td style="border: 0"><input class="button" name="cmdAddbefore" type=button
			value="添加" onclick="addNewRow('tblCollects');showDateTag('tblCollects');try{topObjectFrame();}catch(e){};">
			<input class="button" name="cmdMovePrev"
			type=button value="上移" onclick="movePrev('tblCollects','selCollects')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblCollects','selCollects')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblCollects','培训机构人才培训情况汇总表')"></td>
	</tr>
</table>
<script type="text/javascript">
/**
 * 增加一行
 * @param tableId表格Id
 * @param radioId
 * @param nNewRowPosition
 * @param startRowIndex
 */
function addNewRowDeal(table)
{   var maxLinNum ='';
    var addHtml ='';
	if(table.attr("id") == 'tblTrains'){
		 maxLinNum=table.find("tr").length-3;
		 addHtml=table.find("tr")[2].innerHTML;
	}else{
	     maxLinNum=table.find("tr").length-2;//获得行数，减去表头和隐藏行
	     addHtml=table.find("tr")[1].innerHTML;
	}
	var lineNum=""+(maxLinNum+1);
	
	//var addHtml=table.find("tr")[1].innerHTML;//获得隐藏行的html,查找第二行
	addHtml=addHtml.replace(/\[index\]/g,lineNum);
	lineNum = (parseInt(lineNum, 10)-1).toString();//2011.12.13 行下标比行号小1(隐藏行下标[0]，第一行下标[00])
	if (lineNum.length==1)//如果是个位数，前面补0
		lineNum="0"+lineNum;
	addHtml=addHtml.replace(/\[0\]/g,"["+lineNum+"]");//替换html中行号
	addHtml=addHtml.replace(/\|/g,"/");//替换html中节点/的代替符"|"
	table.append("<tr>"+addHtml+"</tr>");//将html增加到最后
	/*
	table.find("tr:last").find(":text,textarea,select").not(":hidden").each(function(){
		var objClass=$(this).attr("class");
		if(objClass==null){
			objClass="required";
		}
		else if(objClass.indexOf("nvalidate")>=0){
			
		}
		else if(objClass!=null&&objClass.indexOf("required")==-1){
			objClass=objClass+" required";
		} 
		$(this).attr("class",objClass);//给所有行的列加上必填检查
	});
	*/
	//reDealRow(tbl);
}


/**
* 重新计算行号
* @param tblId
*/
function refreshRowINdex(tblId){
	//重新计算行号
	$("#"+tblId+" tr").each(function(){
		
	var seq=$(this).get(0).rowIndex;//获得行数
	if(seq>1){//如果有行 显示时display行不计入类，故只减1
		seq=seq-1;
	if(tblId== 'tblTrains'){
		seq=seq-1;
	}
	var seq_no=$(this).find("[name$='seq_no']");
	if(seq_no.is("span"))
	seq_no.html(seq);
	else
	seq_no.val(seq);
	seq=""+(seq-1);
	if(seq.length==1)
	seq="0"+seq;
	//替换相应的name参数的seq
	$(this).find("input,span,textarea,select").each(function(){
	var name=$(this).attr("name");
	if(name!=null&&name!=""){
	name=name.replace(/\[\d*\]/g,"["+seq+"]");
	$(this).attr("name",name);
	}
	var id=$(this).attr("id");
	if(id!=null&&id!=""){
	id=id.replace(/\[\d*\]/g,"["+seq+"]");
	$(this).attr("id",id);
	}
	var className=$(this).attr("class");
	if(className!=null&&className!=""){
	className=className.replace(/\[\d*\]/g,"["+seq+"]");
	$(this).attr("class",className);
	}
	});
	}
	}
	);
} 

/**
* 上移行
* @param tblId
* @returns {Boolean}
*/
function movePrev(tblId,selName) {
	var minusCnt = 2;
	if(tblId== 'tblTrains'){
		minusCnt=minusCnt+1;
	}
	if (!selName)
	selName = "";
	if ($("#" + tblId + " :radio[name*='" + selName + "']:checked").length == 0) {
	scmWarn(irisNotes.prevWarn);
	return false;
	}
	if ($("#" + tblId + " tr").length <= minusCnt)
	return false;
	var trChecked = $("#" + tblId + " :radio[name*='" + selName + "']:checked")
	.parents("tr").first();// 取得被选中的行
	var trPrev = trChecked.prev();// 取得上一行
	var index = trChecked.get(0).rowIndex;// 获得行号
	if (index <= minusCnt) {// 如果是第一行
	scmWarn(irisNotes.tabelMoveWarn1);
	return false;
	}
	//trChecked.remove();
	trPrev.before(trChecked);
	trChecked.find(":radio[name*='" + selName + "']").attr("checked", 'true');
	refreshRowINdex(tblId);
}
function delContent1(tableId,objIndex) {
	var file_code = $("#file_code").val();
	if(file_code != ''){
 	if (confirm("切换项目内容会清空经费信息中附件上传信息，您确定要切换吗？")) {
 		if(!objIndex && objIndex!=0)objIndex="";
 		$("#" + tableId).find("span[name$='file_name"+objIndex+"']").text("");// 清空文件名
 		$("#" + tableId).find("span[name$='file_date"+objIndex+"']").text("");// 清空时间
 		$("#" + tableId).find("input[type='hidden'][name$='file_code"+objIndex+"']")
 				.val("");// 清空文件code
 		$("#uploadsuccess"+objIndex).hide();
 		setContent();
 	}else{
 		$("#project_cotent_01").attr("checked",true);
 	}
	}else{
		setContent();
	}
 }
</script>




